import 'package:flutter_app/generated/json/base/json_field.dart';
import 'package:flutter_app/generated/json/system_system_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class SystemSystemEntity {
	late List<SystemSystemData> data;
	late int errorCode;
	late String errorMsg;

	SystemSystemEntity();

	factory SystemSystemEntity.fromJson(Map<String, dynamic> json) => $SystemSystemEntityFromJson(json);

	Map<String, dynamic> toJson() => $SystemSystemEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SystemSystemData {
	late List<dynamic> articleList;
	late String author;
	late List<SystemSystemDataChildren> children;
	late int courseId;
	late String cover;
	late String desc;
	late int id;
	late String lisense;
	late String lisenseLink;
	late String name;
	late int order;
	late int parentChapterId;
	late int type;
	late bool userControlSetTop;
	late int visible;

	SystemSystemData();

	factory SystemSystemData.fromJson(Map<String, dynamic> json) => $SystemSystemDataFromJson(json);

	Map<String, dynamic> toJson() => $SystemSystemDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SystemSystemDataChildren {
	late List<dynamic> articleList;
	late String author;
	late List<dynamic> children;
	late int courseId;
	late String cover;
	late String desc;
	late int id;
	late String lisense;
	late String lisenseLink;
	late String name;
	late int order;
	late int parentChapterId;
	late int type;
	late bool userControlSetTop;
	late int visible;

	SystemSystemDataChildren();

	factory SystemSystemDataChildren.fromJson(Map<String, dynamic> json) => $SystemSystemDataChildrenFromJson(json);

	Map<String, dynamic> toJson() => $SystemSystemDataChildrenToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}